// import { AppContainer } from 'react-hot-loader';
import React from 'react';
import ReactDOM from 'react-dom';

import './index.scss';
// import App from './App';
// import registerServiceWorker from './registerServiceWorker';

import configureStore from './redux/store/store';
import {Provider} from 'react-redux';

import MyRouters from './router/router';

const store = configureStore();

store.subscribe(() => { //监听state变化
    console.log(store.getState())
});

const render = (Comp) => {
  ReactDOM.render(
      <Provider store={store}>
        <Comp />
      </Provider>,
     document.getElementById('root')
   );
}

render(MyRouters)


// registerServiceWorker();
